<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta name="author" content="小袁同学,1971788445@qq.com,广州新华学院">
  <meta name="Keywords" content="小袁博客,小袁Java学习站,小袁Java学习平台,文章,博客,小袁博客,article,blog">
  <meta name="description" content="小袁博客,小袁Java学习站,小袁Java学习平台,文章,博客,小袁博客,article,blog,分享Java相关的知识和经验以及各大框架的项目开发提供Java学习的圈子">
  <meta http-equiv="content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
  <link rel="shortcut icon" href="/static/img/favicon.ico">
  <!-- 基础样式库 -->
  <link rel="stylesheet" href="/static/css/bootstrap.css"/>
  <link rel="stylesheet" href="/static/css/font-awesome.css"/>
  <link rel="stylesheet" href="/static/css/animate.css"/>
  <!-- hplus样式库 -->
  <link rel="stylesheet" href="/static/css/hplus.css"/>
  <!-- 公共样式 -->
  <link rel="stylesheet" href="/static/css/customer/common.css"/>
  <!-- 页脚样式 -->
  <link rel="stylesheet" href="/static/css/customer/footer&cbl.css"/>
  <!-- 导航栏样式 -->
  <link rel="stylesheet" href="/static/css/customer/header.css"/>
  <!-- 侧边信息样式 -->
  <link rel="stylesheet" href="/static/css/sideBar/sidebar.css"/>
  <script type="text/javascript" src="/static/js/jquery-1.11.3.js"></script>
  <script type="text/javascript" src="/static/js/bootstrap.js"></script>
  <!-- 模板 -->
  <script type="text/javascript" src="/static/js/customer/template.js"></script>
  <!-- 音乐播放器样式 -->
  <link rel="stylesheet" href="/static/css/customer/player.min.css"/>
  <!-- 音乐播放器JS -->
  <script type="text/javascript" src="/static/js/customer/player.min.js"></script>
  <!-- element ui -->
  <link rel="stylesheet" href="/static/css/element-ui.css">
  <!-- 开发环境版本，包含了有帮助的命令行警告 -->
  <script src="/static/js/vue.js"></script>
  <script src="/static/js/element-ui.js"></script>
  <script src="/static/js/httpVueLoader.js"></script>
  <!-- leEditor -->
  <script src="/static/js/leEditor.js"></script>
  <title>小袁博客</title>
</head>
<body>
<div id="main" v-cloak>
  <!-- 导航栏 -->
  <xy-navbar ref="xyNavbar" :user-info="userInfo"></xy-navbar>
  <!-- 导航栏 -->

  <!-- 中间内容 -->
  <div class="gray-bg top-navigation">
    <div id="wrapper">
      <div id="page-wrapper" class="time-line-bg">
        <div class="wrapper wrapper-content">
          <div class="container-fluid">
            <div class="col">
              <div class="col-lg-8 col-md-8 col-xs-12">
                <div class="col-md-12">
                  <div class="ibox float-e-margins">
                    <div class="text-right float-e-margins m-r-xl">
                      <a @click="reverseTime()" class="btn btn-xs btn-primary" id="leftVersion">切换顺序</a>
                    </div>
                    <div class="" id="ibox-content">
                      <div id="vertical-timeline"
                           class="vertical-container light-timeline opacity-9">
                        <div class="vertical-timeline-block" v-for="(item, index) in timeLineList">
                          <div class="vertical-timeline-icon lazur-bg">
                            <i class="fa">{{ timeLineList.length - index }}</i>
                          </div>
                          <div class="vertical-timeline-content">
                            <h2><strong>{{ item.title }}</strong></h2>
                            <p>{{ item.describe }}</p>
                            <button class="btn btn-sm btn-success" @click="openTimeLineDetail(item.content)"> 查看详细 <i
                              class="fa fa-hand-pointer-o m-l-xs"></i></button>
                            <span class="vertical-date"><i
                              class="glyphicon glyphicon-time text-warning font-size-xs"></i><br/>
								<span class="text-info">{{ item.startTime }} - {{ item.endTime }}</span>
							</span>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="col">
              <div class="col-lg-4 col-md-4 hidden-xs hidden-sm">
                <!-- 个人资料 -->
                <div class="col-md-12 m-b-md" th:insert="common/commonSidebar::side-personal"></div>
                <!-- 个人资料 -->

                <!-- 搜索 -->
                <div class="col-md-12 m-b-sm padding-l-r-60 opacity-8" th:insert="common/commonSidebar::side-search">

                </div>
                <!-- 搜索 -->

                <!-- 热门文章 -->
                <div class="col-md-12 side-hot padding-l-r-60 opacity-8"
                     th:insert="common/commonSidebar::side-hot"></div>
                <!-- 热门文章 -->

                <!-- 文章档案 -->
                <div class="col-md-12 side-archive padding-l-r-60 opacity-8"
                     th:insert="common/commonSidebar::side-archive"></div>
                <!-- 文章档案 -->

                <!-- 最新文章 -->
                <div class="col-md-12 side-new padding-l-r-60 opacity-8"
                     th:insert="common/commonSidebar::side-new"></div>
                <!-- 最新文章 -->
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- 详细内容弹框 -->
  <el-dialog title="详细内容" :visible.sync="detailVisible">
    <div>
      <le-preview ref="md-preview" :is-md="true" :value="content" hljs-css="agate"></le-preview>
    </div>
  </el-dialog>

  <!-- 提交建议和问题反馈 -->
  <xy-feedback ref="xyFeedback"></xy-feedback>

  <!-- 中间内容 -->

  <!-- 页脚 -->
  <div th:insert="common/common::footer"></div>
  <!-- 页脚 -->

  <!-- 右侧工具 -->
  <div th:insert="common/common::right-toolbar"></div>
  <!-- 右侧工具 -->
</div>

<!-- 音乐播放器 -->
<div id="player"></div>
<!-- 引入歌曲列表和配置信息 -->
<script type="text/javascript" src="/static/js/customer/music.js"></script>
<!-- hplus的JS -->
<script type="javascript" src="/static/js/content.min.js"></script>
<script src="/static/js/axios.min.js"></script>
<script type="module">
  import timeline from "../../static/js/api/timeline.js";
  import userOperation from "../../static/js/common/navbar/userOperation.js";
  import feedback from "../../static/js/common/dialog/feedback.js";

  // 使用httpVueLoader
  Vue.use(httpVueLoader);

  var app = new Vue({
    el: '#main',
    components: {
      'xy-navbar': 'url:/static/component/navbar/index.vue',
      'xy-feedback': 'url:/static/component/dialog/feedback.vue'
    },
    data() {
      return {
        userInfo: {},
        // 时间线内容相关
        detailVisible: false,
        timeLineList: [],
        content: '',
      }
    },
    methods: {
      // 打开问题反馈框
      openProblemDialog() {},
      // 打开提交建议框
      openSuggestDialog() {},
      // 提交问题反馈
      submitProblemFeedback() {},
      // 提交建议反馈
      submitSuggestFeedback() {},
      // 获取用户数据
      getUserInfo() {},
      // 退出登录
      logout() {},
      // 修改个人信息
      submitEditPersonal() {},
      // 找回密码
      submitFindPassword() {},
      // 修改密码
      submitEditPassword() {},
      // 发送验证码
      sendEmailCode() {},
      // 修改邮箱
      submitEditEmail(){},
      // 发送短信验证码
      sendMobileCode(){},
      // 提交修改号码
      submitEditMobileNumber(){},
      // 获取时间线列表
      findTimeLineList() {
        timeline.findTimeLineList().then(res => {
          this.timeLineList = res.data.timeLineList.list
        })
      },
      // 打开详细框
      openTimeLineDetail(content) {
        this.detailVisible = true;
        this.content = content
      },
      // 切换顺序
      reverseTime() {
        this.timeLineList.reverse()
      }
    },
    mounted() {
    },
    beforeMount() {
      this.findTimeLineList();
    },
    created() {
      // 函数覆盖
      this.openProblemDialog = feedback.openProblemDialog();
      this.openSuggestDialog = feedback.openSuggestDialog();
      this.submitProblemFeedback = feedback.submitProblemFeedback();
      this.submitSuggestFeedback = feedback.submitSuggestFeedback();
      // 顶部个人相关方法
      this.getUserInfo = userOperation.getUserInfo();
      this.getUserInfo();
      this.logout = userOperation.logout();
      this.submitEditPersonal = userOperation.submitEditPersonal();
      this.submitFindPassword = userOperation.submitFindPassword();
      this.submitEditPassword = userOperation.submitEditPassword();
      this.sendEmailCode = userOperation.sendEmailCode();
      this.submitEditEmail = userOperation.submitEditEmail();
      this.sendSmsCode = userOperation.sendSmsCode();
      this.submitEditMobileNumber = userOperation.submitEditMobileNumber();
    }
  })
</script>
</body>
</html>
